﻿using Keyer.DataBase.Model;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;

namespace Keyer.DataBase.Mapping.LocalDB
{
    public class BasicdataMap : EntityTypeConfiguration<sys_basicdata>
    {
        public BasicdataMap()
        {
            // 表名
             ToTable("Basicdata");

            //// 主键
            this.HasKey(t => t.id);

            // 属性特性
            this.Property(t => t.id)
                .HasColumnName("basicdataId").HasMaxLength(40).HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);
            this.Property(t => t.code)
                .HasColumnName("code")                
                .HasMaxLength(100)
                .IsRequired();
            this.Property(t => t.des)
                .HasColumnName("des")                
                .HasMaxLength(100)
                .IsRequired();

        }
    }
}
